package com.example.elinkdemo.util;

import android.os.Looper;

import java.util.Locale;
import java.util.regex.Pattern;

public class CommUtils {


    public static boolean isMainLooper() {
        return Looper.myLooper() == Looper.getMainLooper();
    }


    public static boolean isChinese() {
        String language = Locale.getDefault().getLanguage();
        return "zh".equals(language);
    }


    /**
     * 判断是不是英文字符
     *
     * @param c
     * @return
     */
    public static boolean isEnglishChar(String c) {
        return Pattern.matches("[a-zA-Z]", c);
    }
}
